<?php
include_once("functions/db_manipulate.php");

if (!init()) {
    redirect("?action=login");
    exit();
}

?>

<meta charset="UTF-8">
<?php

$topicsResultSet = getAllTopics();

?>

<div class="userscontent">
    <div class="blockheader">
        Все темы:
    </div>

    <?php
    while ($topic = mysql_fetch_assoc($topicsResultSet)) {
        ?>
        <div class="user">
            <div class="usertd">
                <?= $topic['author'] ?>
            </div>
            <div class="usertd">
                <?= $topic['header'] ?>
            </div>
            <div class="usertd">
                <?= $topic['tgroup'] ?>
            </div>

        </div>
        <div class="blockuserbutton" onclick="location.href='?action=showmod&tid=<?= $topic['id'] ?>'">
            Модераторы
        </div>

    <?
    }
    ?>

</div>